import React from "react";
import useLazyLoadImg from "./useLazyLoadImg";

const LazyImg = () => {
  const [LazyImg, setImgSrc] = useLazyLoadImg(
    "https://lf3-cdn-tos.bytescm.com/obj/static/xitu_juejin_web/img/default.640d9a7.png"
  );
  return (
    <div
      onClick={() => {
        setImgSrc(
          "https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/95414745836549ce9143753e2a30facd~tplv-k3u1fbpfcp-no-mark:160:160:160:120.awebp"
        );
      }}
    >
      lazyImg
      {LazyImg}
    </div>
  );
};

export default LazyImg;
